<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .middle {
      vertical-align: middle;
    }
  </style>
</head>

<body>
  <div>
    <input type="text"><input type="button" value="按钮">
  </div>

  <br>

  <div>
    <!-- 解决 input 和 button 无法对齐 -->
    <input class="middle" type="text"><input class="middle" type="button" value="按钮">
  </div>
</body>

</html>